package com.benjaminwan.read.free.utils

import android.view.ViewGroup
import com.benjaminwan.read.free.R
import com.benjaminwan.read.free.app.App
import com.mywork.swipemenulayout.SwipeMenuItem

val groupRightMenu: List<SwipeMenuItem> by lazy {
    listOf(
        SwipeMenuItem.Builder(App.INSTANCE)
            .setId(1)
            .setWidth(dp2px(50))
            .setHeight(ViewGroup.LayoutParams.MATCH_PARENT)
            .setTitle("向上移动")
            .setTitleColor(R.color.selector_white_to_grey5)
            .setBackground(R.drawable.bg_cyan5_to_cyan7)
            .setIcon(R.drawable.ic_keyboard_arrow_up)
            .setIconColor(R.color.selector_white_to_grey5)
            .build(),
        SwipeMenuItem.Builder(App.INSTANCE)
            .setId(2)
            .setWidth(dp2px(50))
            .setHeight(ViewGroup.LayoutParams.MATCH_PARENT)
            .setTitle("向下移动")
            .setTitleColor(R.color.selector_white_to_grey5)
            .setBackground(R.drawable.bg_green5_to_green7)
            .setIcon(R.drawable.ic_keyboard_arrow_down)
            .setIconColor(R.color.selector_white_to_grey5)
            .build(),
        SwipeMenuItem.Builder(App.INSTANCE)
            .setId(3)
            .setWidth(dp2px(50))
            .setHeight(ViewGroup.LayoutParams.MATCH_PARENT)
            .setTitle("复制组")
            .setTitleColor(R.color.selector_white_to_grey5)
            .setBackground(R.drawable.bg_amber5_to_amber7)
            .setIcon(R.drawable.ic_copy_clipboard)
            .setIconColor(R.color.selector_white_to_grey5)
            .build(),
        SwipeMenuItem.Builder(App.INSTANCE)
            .setId(0)
            .setWidth(dp2px(50))
            .setHeight(ViewGroup.LayoutParams.MATCH_PARENT)
            .setTitle("删除组")
            .setTitleColor(R.color.selector_white_to_grey5)
            .setBackground(R.drawable.bg_red5_to_red7)
            .setIcon(R.drawable.ic_delete)
            .setIconColor(R.color.selector_white_to_grey5)
            .build()
    )
}

val actionRightMenu: List<SwipeMenuItem> by lazy {
    listOf(
        SwipeMenuItem.Builder(App.INSTANCE)
            .setId(1)
            .setWidth(dp2px(50))
            .setHeight(ViewGroup.LayoutParams.MATCH_PARENT)
            .setTitle("向上移动")
            .setTitleColor(R.color.selector_white_to_grey5)
            .setBackground(R.drawable.bg_cyan5_to_cyan7)
            .setIcon(R.drawable.ic_keyboard_arrow_up)
            .setIconColor(R.color.selector_white_to_grey5)
            .build(),
        SwipeMenuItem.Builder(App.INSTANCE)
            .setId(2)
            .setWidth(dp2px(50))
            .setHeight(ViewGroup.LayoutParams.MATCH_PARENT)
            .setTitle("向下移动")
            .setTitleColor(R.color.selector_white_to_grey5)
            .setBackground(R.drawable.bg_green5_to_green7)
            .setIcon(R.drawable.ic_keyboard_arrow_down)
            .setIconColor(R.color.selector_white_to_grey5)
            .build(),
        SwipeMenuItem.Builder(App.INSTANCE)
            .setId(0)
            .setWidth(dp2px(50))
            .setHeight(ViewGroup.LayoutParams.MATCH_PARENT)
            .setTitle("删除动作")
            .setTitleColor(R.color.selector_white_to_grey5)
            .setBackground(R.drawable.bg_red5_to_red7)
            .setIcon(R.drawable.ic_delete)
            .setIconColor(R.color.selector_white_to_grey5)
            .build()
    )
}